import React, { useState } from 'react'
import { Upload } from 'antd';
export default function Photo() {
    const [fileList, setFileList] = useState([]);
    const onChange = ({ fileList: newFileList }) => {
        setFileList(newFileList);
    };
    return (
        <div>
            <Upload
                listType="picture-card"
                fileList={fileList}
                onChange={onChange}
                beforeUpload={() => { return false }}
            >
                {fileList.length < 1 && '上传头像'}
            </Upload>
        </div >
    )
}
